import java.text.SimpleDateFormat;
import java.util.Calendar;

public class Demo4 {
    public static void main(String[] args) {
        Calendar calendar = Calendar.getInstance();
        SimpleDateFormat s = new SimpleDateFormat("yyyy-mm-dd HH:mm:ss");

        System.out.println(s.format(calendar.getTime()));
        //System.out.println(calendar.getTime());
    }
}
